package org.example.types.common;


/**
 * @author yinghuashen
 * @version 1.0
 * @description
 * @date 2025/3/9 22:29
 */

public class MQConstants {

    /**
     * V1 使用的 RocketMQ 常量
     */

    public final static String LOCK_ORDER_PRODUCER_GROUP = "lock_order_producer_group";

    public final static String LOCK_ORDER_CONSUMER_GROUP = "lock_order_consumer_group";

    public final static String LOCK_ORDER_TOPIC = "lock_order_topic";

    public final static String NEW_ORDER_TAG = "new_order_tag";

    public final static String ORDER_TRANSACTION_PRODUCER_GROUP = "order_transaction_producer_group";

    public final static String ORDER_TRANSACTION_CONSUMER_GROUP = "order_transaction_consumer_group";

    public final static String ORDER_TRANSACTION_TOPIC = "order_transaction_topic";

    public final static String SETTLE_ORDER_TAG = "settle_order_tag";

    /**
     * V2 使用的 RocketMQ 常量
     */
    // 延时取消订单相关常量
    public static final String DELAY_CANCEL_ORDER_PRODUCER_GROUP = "delay_cancel_order_producer_group";
    public static final String DELAY_CANCEL_ORDER_CONSUMER_GROUP = "delay_cancel_order_consumer_group";
    public static final String DELAY_CANCEL_ORDER_TOPIC = "delay_cancel_order_topic";
    // 发送超时时间
    public static final long DELAY_CANCEL_ORDER_TIMEOUT = 5000;

    // 支付成功回调相关常量
    public static final String SUCCEED_PAY_CALLBACK_PRODUCER_GROUP = "succeed_pay_callback_producer_group";
    public static final String SUCCEED_PAY_CALLBACK_CONSUMER_GROUP = "succeed_pay_callback_consumer_group";
    public static final String SUCCEED_PAY_CALLBACK_TOPIC = "succeed_pay_callback_topic";

    // 退款相关常量
    public static final String REFUND_PRODUCER_GROUP = "refund_producer_group";
    public static final String REFUND_CONSUMER_GROUP = "refund_consumer_group";
    public static final String REFUND_TOPIC = "refund_topic";
    // 发送超时时间
    public static final long REFUND_TIMEOUT = 5000;

    // 延时双删缓存相关常量
    public static final String DELAY_DOUBLE_DELETE_CACHE_PRODUCER_GROUP = "delay_double_delete_cache_producer_group";
    public static final String DELAY_DOUBLE_DELETE_CACHE_CONSUMER_GROUP = "delay_double_delete_cache_consumer_group";
    public static final String DELAY_DOUBLE_DELETE_CACHE_TOPIC = "delay_double_delete_cache_topic";
    // 发送超时时间
    public static final long DELAY_DOUBLE_DELETE_CACHE_TIMEOUT = 5000;

    // 延迟级别常量
    public final static int DELAY_LEVEL_1S = 1;
    public final static int DELAY_LEVEL_5S = 2;
    public final static int DELAY_LEVEL_10S = 3;
    public final static int DELAY_LEVEL_30S = 4;
    public final static int DELAY_LEVEL_1M = 5;
    public final static int DELAY_LEVEL_2M = 6;
    public final static int DELAY_LEVEL_3M = 7;
    public final static int DELAY_LEVEL_4M = 8;
    public final static int DELAY_LEVEL_5M = 9;
    public final static int DELAY_LEVEL_6M = 10;
    public final static int DELAY_LEVEL_7M = 11;
    public final static int DELAY_LEVEL_8M = 12;
    public final static int DELAY_LEVEL_9M = 13;
    public final static int DELAY_LEVEL_10M = 14;
    public final static int DELAY_LEVEL_20M = 15;
    public final static int DELAY_LEVEL_30M = 16;
    public final static int DELAY_LEVEL_1H = 17;
    public final static int DELAY_LEVEL_2H = 18;

}
